package com.ruoyi.gas.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.gas.domain.vo.GasEventDetailVo;
import com.ruoyi.gas.domain.vo.IndustryMonthDanger;
import com.ruoyi.gas.domain.vo.MonthWarn;
import com.ruoyi.gas.domain.vo.StreetWarn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gas.mapper.GasWarnRectifyMapper;
import com.ruoyi.gas.domain.GasWarnRectify;
import com.ruoyi.gas.service.IGasWarnRectifyService;

/**
 * 隐患整改详情Service业务层处理
 *
 * @author ruoyi
 * @date 2024-01-18
 */
@Service
public class GasWarnRectifyServiceImpl implements IGasWarnRectifyService
{
    @Autowired
    private GasWarnRectifyMapper gasWarnRectifyMapper;

    /**
     * 查询隐患整改详情
     *
     * @param id 隐患整改详情主键
     * @return 隐患整改详情
     */
    @Override
    public GasWarnRectify selectGasWarnRectifyById(Long id)
    {
        return gasWarnRectifyMapper.selectGasWarnRectifyById(id);
    }

    /**
     * 查询隐患整改详情列表
     *
     * @param gasWarnRectify 隐患整改详情
     * @return 隐患整改详情
     */
    @Override
    public List<GasWarnRectify> selectGasWarnRectifyList(GasWarnRectify gasWarnRectify)
    {
        return gasWarnRectifyMapper.selectGasWarnRectifyList(gasWarnRectify);
    }

    /**
     * 新增隐患整改详情
     *
     * @param gasWarnRectify 隐患整改详情
     * @return 结果
     */
    @Override
    public int insertGasWarnRectify(GasWarnRectify gasWarnRectify)
    {
        gasWarnRectify.setCreateTime(DateUtils.getNowDate());
        return gasWarnRectifyMapper.insertGasWarnRectify(gasWarnRectify);
    }

    /**
     * 修改隐患整改详情
     *
     * @param gasWarnRectify 隐患整改详情
     * @return 结果
     */
    @Override
    public int updateGasWarnRectify(GasWarnRectify gasWarnRectify)
    {
        gasWarnRectify.setUpdateTime(DateUtils.getNowDate());
        return gasWarnRectifyMapper.updateGasWarnRectify(gasWarnRectify);
    }

    /**
     * 批量删除隐患整改详情
     *
     * @param ids 需要删除的隐患整改详情主键
     * @return 结果
     */
    @Override
    public int deleteGasWarnRectifyByIds(Long[] ids)
    {
        return gasWarnRectifyMapper.deleteGasWarnRectifyByIds(ids);
    }

    /**
     * 删除隐患整改详情信息
     *
     * @param id 隐患整改详情主键
     * @return 结果
     */
    @Override
    public int deleteGasWarnRectifyById(Long id)
    {
        return gasWarnRectifyMapper.deleteGasWarnRectifyById(id);
    }

    @Override
    public List<Map<String, Integer>> getWarnCountTrend(int type) {
        return gasWarnRectifyMapper.getWarnCountTrend(type);
    }

    @Override
    public int getWarnCounts() {
        return gasWarnRectifyMapper.getWarnCounts();
    }


    @Override
    public List<Map<String, Integer>> getBottomCount(Integer type,Integer form) {
        return gasWarnRectifyMapper.getBottomCount(type,form);
    }

    @Override
    public int getGovern() {
        return gasWarnRectifyMapper.getGovern();
    }

    @Override
    public List<Map<String, Object>> getGovernDetail() {
        return gasWarnRectifyMapper.getGovernDetail();
    }

    @Override
    public List<Map<String, Object>> getWarnList() {
        return gasWarnRectifyMapper.getWarnList();
    }

    @Override
    public List<Map<String, Object>> getDailyEventCount(Long companyId) {
        return gasWarnRectifyMapper.getDailyEventCount(companyId);
    }

    @Override
    public Map<String,Integer> getCompanyWarnCount(Long companyId) {
        return gasWarnRectifyMapper.getCompanyWarnCount(companyId);
    }

    @Override
    public List<Map<String, Integer>> getCompanyBottom(Long companyId, Integer type, Integer form) {
        return gasWarnRectifyMapper.getCompanyBottom(companyId, type, form);
    }

    @Override
    public int getCompanyGovern(Long companyId) {
        return gasWarnRectifyMapper.getCompanyGovern(companyId);
    }

    @Override
    public List<Map<String, Object>> getCompanyGovernDetail(Long companyId) {
        return gasWarnRectifyMapper.getCompanyGovernDetail(companyId);
    }

    @Override
    public List<Map<String, Object>> getCompanyEventList(Long companyId) {
        return gasWarnRectifyMapper.getCompanyEventList(companyId);
    }

    @Override
    public List<Map<String, Object>> getAllWarnListByHead(Long companyId) {
        return gasWarnRectifyMapper.getAllWarnListByHead(companyId);
    }

    @Override
    public List<Map<String,Object>> getWarnDetailById(Long id) {
        return gasWarnRectifyMapper.getWarnDetailById(id);
    }

    @Override
    public List<Map<String, Object>> getWarnListByRectifier(Long rectifier) {
        return gasWarnRectifyMapper.getWarnListByRectifier(rectifier);
    }

    @Override
    public List<Map<String, Object>> getAuditWarnList(Long userId) {
        return gasWarnRectifyMapper.getAuditWarnList(userId);
    }

    @Override
    public List<Map<String,Object>> getDetailListByWarnId(Long id) {
        return gasWarnRectifyMapper.getDetailListByWarnId(id);
    }

    @Override
    public List<IndustryMonthDanger> selectMonthDangerByIndustry() {
        return gasWarnRectifyMapper.selectMonthDangerByIndustry();
    }

    @Override
    public IndustryMonthDanger selectMonthDangerSumByIndustry() {
        return gasWarnRectifyMapper.selectMonthDangerSumByIndustry();
    }

    @Override
    public List<MonthWarn> selectWarnByMonthList() {
        return gasWarnRectifyMapper.selectWarnByMonthList();
    }

    @Override
    public List<StreetWarn> selectStreetWarnList() {
        return gasWarnRectifyMapper.selectStreetWarnList();
    }
}
